﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Ivy.Common.Framework.Base
{
   
    [Serializable]
    public enum DeleteType
    {
        HardDeleteAllowed = 0,
        SoftDeleteOnly = 1
    }
    [Serializable]
    [DataContract]
    public class EntityBase
    {
        #region Variables & Constants
        DateTime lSys_DateOfCreation = DateTime.Now;
        DateTime lSys_DateOfModification = DateTime.Now;
        string lSys_CreatedByID = string.Empty;
        string lSys_ModifiedByID = string.Empty;
        DeleteType lSys_DeleteType = DeleteType.HardDeleteAllowed;
        bool lSys_IsDeleted = true;
        Int32 lSys_OrganizationID = -1;
        string lSys_InitialPrimaryKeys = string.Empty;
        string lSys_WorkstationName = "Default";

        #endregion Variables & Constants

        #region Constructor & Destructor
        #endregion Constructor & Destructor

        #region Public Properties
        [DataMember]
        public DateTime Sys_DateOfCreation
        {
            get
            {
                return lSys_DateOfCreation;
            }
            set
            {
                lSys_DateOfCreation = value;
            }
        }
        [DataMember]
        public DateTime Sys_DateOfModification
        {
            get
            {
                return lSys_DateOfModification;
            }
            set
            {
                lSys_DateOfModification = value;
            }
        }
        [DataMember]
        public string Sys_CreatedByID
        {
            get
            {
                return lSys_CreatedByID;
            }
            set
            {
                lSys_CreatedByID = value;
                this.lSys_ModifiedByID = value;
            }
        }
        [DataMember]
        public string Sys_ModifiedByID
        {
            get
            {
                return lSys_ModifiedByID;
            }
            set
            {
                lSys_ModifiedByID = value;
            }
        }
        [DataMember]
        public DeleteType Sys_DeleteType
        {
            get
            {
                return lSys_DeleteType;
            }
            set
            {
                lSys_DeleteType = value;
            }
        }
        [DataMember]
        public bool Sys_IsDeleted
        {
            get
            {
                return lSys_IsDeleted;
            }
            set
            {
                lSys_IsDeleted = value;
            }
        }
        [DataMember]
        public Int32 Sys_OrganizationID
        {
            get
            {
                return lSys_OrganizationID;
            }
            set
            {
                lSys_OrganizationID = value;
            }
        }
        [DataMember]
        public string Sys_InitialPrimaryKeys
        {
            get
            {
                return lSys_InitialPrimaryKeys;
            }
            set
            {
                lSys_InitialPrimaryKeys = value;
            }
        }
        [DataMember]
        public string Sys_WorkstationName
        {
            get
            {
                return lSys_WorkstationName;
            }
            set
            {
                lSys_WorkstationName = value;
            }
        }
        #endregion Public Properties
        
        #region Public Methods
        #endregion Public Methods

        #region Events
        #endregion Events

        #region Private Methods
        #endregion Private Methods
    }
}
